#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2021/6/3 15:33
# @Author  : fuchen'en
# @Description:

from ctypes import *

dll = CDLL('./signal_reception/testDll.dll')

print(dll.sum(1, 2))  # 3

int_array = c_int * 2
print(dll.ptIntArray(byref(int_array(3, 4))))  # 7

my_str = b'ab'
print(c_char_p(my_str))  # my_str的char型指针地址
print(dll.ptIntArray2(c_char_p(my_str)))  # a 97 b 98

my_int_str = bytes(range(10))
print(dll.ptIntArray3(c_char_p(my_int_str), 2, 3))  # 5
print(dll.ptIntArray4(c_char_p(my_int_str), 9))  # 9
